package org.linlinjava.litemall.db.service;

import org.linlinjava.litemall.db.dao.AgedmallChargeTemplateMapper;
import org.linlinjava.litemall.db.dao.AgedmallExplainMapper;
import org.linlinjava.litemall.db.dao.app.AppExplainMapper;
import org.linlinjava.litemall.db.domain.*;
import org.linlinjava.litemall.db.vo.app.ExplainDto;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Service
public class AgedmallChargeTemplateService {

    @Resource
    private AgedmallChargeTemplateMapper agedmallChargeTemplateMapper;


    public AgedmallChargeTemplate findById(Integer id) {
        return agedmallChargeTemplateMapper.selectByPrimaryKey(id);
    }

    public List<AgedmallChargeTemplate> findByIds(List<Integer> idList) {
        if(idList.size() == 0) {
            return new ArrayList<>();
        }
        AgedmallChargeTemplateExample example = new AgedmallChargeTemplateExample();
        example.createCriteria().andIdIn(idList).andDeletedEqualTo(false);
        return agedmallChargeTemplateMapper.selectByExample(example);
    }
}
